<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
    <title>PHPXRef 0.7 : OpenSSO PHP Library 1.5.1 : Detail view of open-sso.class.php</title>
    <link rel="stylesheet" href="sample.css" type="text/css">
    <link rel="stylesheet" href="sample-print.css" type="text/css" media="print">
    <style id="hilight" type="text/css"></style>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
	<tr>
        <td valign="top" class="pagetitle">
            [ <a href="index.html">Index</a> ]
        </td>
        <td align="right" class="pagetitle">
		    <h2 style="margin-bottom: 0px">PHP Cross Reference of OpenSSO PHP Library 1.5.1</h2>
	    </td>
    </tr>
</table>


<!-- Generated by PHPXref 0.7 at Fri Jan  8 00:38:44 2010 -->
<!-- PHPXref (c) 2000-2007 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->

<script src="phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='';
subdir='';
filename='open-sso.class.php.html';
cookiekey='opensso-phplib_1.5';
handleNavFrame(relbase, subdir, filename);

// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
  document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
  document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
<script language="JavaScript" type="text/javascript">
<!--

document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');

document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h2 class="details-heading"><a href="./index.html">/</a> -> <a href="open-sso.class.php.source.html">open-sso.class.php</a> (summary)</h2>
<div class="details-summary">
<p class="viewlinks">[<a href="open-sso.class.php.source.html">Source view</a>]
[<a href="javascript:window.print();">Print</a>]
[<a href="_stats.html">Project Stats</a>]</p>
<p><b>Session and User (database) handler for OpenSSO PHP library. This class's functions connect your application with the OpenSSO PHP library. Please read the inline documentation and write this class! Before you test it please look after the config file: config.php!</b></p>
<table>
<tr><td align="right">Category: </td><td>OpenSSO_PHP</td></tr>
<tr><td align="right">Link: </td><td><a href="http://kir-dev.sch.bme.hu/opensso-phplib/" target="_blank">http://kir-dev.sch.bme.hu/opensso-phplib/</a></td></tr>
<tr><td align="right">Package: </td><td>OpenSSO_PHP</td></tr>
<tr><td align="right">File Size: </td><td>164 lines (4 kb)</td></tr>
<tr><td align="right">Included or required: </td><td><a href="open-sso.class.php.xref.html">1 time</a></td></tr>
<tr><td align="right" valign="top">Referenced: </td><td>0 times</td></tr>
<tr><td align="right" valign="top">Includes or requires: </td><td>1 file<br>&nbsp;<a href="open-sso.abstract.php.html">open-sso.abstract.php</a>
</td></tr>
</table>
<h3>Defines 9 functions</h3>
<div class="inset">
&nbsp;&nbsp;<a href="#getsessiondata">getSessionData</a>()<br>
&nbsp;&nbsp;<a href="#setsessiondata">setSessionData</a>()<br>
&nbsp;&nbsp;<a href="#insertuser">insertUser</a>()<br>
&nbsp;&nbsp;<a href="#selectuser">selectUser</a>()<br>
&nbsp;&nbsp;<a href="#updateuser">updateUser</a>()<br>
&nbsp;&nbsp;<a href="#hooklogin">hookLogin</a>()<br>
&nbsp;&nbsp;<a href="#hooklogout">hookLogout</a>()<br>
&nbsp;&nbsp;<a href="#hookiserror">hookIsError</a>()<br>
&nbsp;&nbsp;<a href="#hookerror">hookError</a>()<br>
</div>
</div>
<br><div class="details-funclist">
<div class="details-classtitle"><a name="functions"><b>Functions</b></a></div>
<div class="details-classinfo">
Functions that are not part of a class:<br><br>
<div class="inset"><table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="getsessiondata" onClick="logFunction('getsessiondata', 'open-sso.class.php.source.html#l22')" href="open-sso.class.php.source.html#l22">getSessionData</a>(<a href="_variables/name.html">$name</a>)&nbsp;&nbsp;
<a href="_functions/getsessiondata.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Get data from the session<BR>
</b><BR><b>param:</b> (string) $name Name of the data.<br>
<b>return:</b> (multi) Value of the data.<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="setsessiondata" onClick="logFunction('setsessiondata', 'open-sso.class.php.source.html#l34')" href="open-sso.class.php.source.html#l34">setSessionData</a>(<a href="_variables/name.html">$name</a>, <a href="_variables/value.html">$value</a>)&nbsp;&nbsp;
<a href="_functions/setsessiondata.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Set data to the session.<BR>
Set the '$value' data to the session with '$name' name.<BR>
If this name exists overwrite it.<BR>
If this name don't exists create it.<BR>
</b><BR><b>param:</b> (string) $name Name of the data.<br>
<b>param:</b> (multi) $value Value of the data.<br>
<b>return:</b> void<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="insertuser" onClick="logFunction('insertuser', 'open-sso.class.php.source.html#l50')" href="open-sso.class.php.source.html#l50">insertUser</a>(<a href="_variables/data.html">$data</a>)&nbsp;&nbsp;
<a href="_functions/insertuser.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Create user.<BR>
Create user with data from the '$data' param (user's SSO data).<BR>
Insert to DB or whatever you store the users.<BR>
Syntax: The data name that you setted in config file ('user' array) with 'sso_' prefix.<BR>
Plus 'user_name', 'user_virid', 'user_groups' variables, and these with 'sso_' prefix.<BR>
</b><BR><b>param:</b> (array) $data Single array of the user's SSO data. Keys represents the data name.<br>
<b>return:</b> void<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="selectuser" onClick="logFunction('selectuser', 'open-sso.class.php.source.html#l66')" href="open-sso.class.php.source.html#l66">selectUser</a>(<a href="_variables/userName.html">$userName</a>)&nbsp;&nbsp;
<a href="_functions/selectuser.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Get the user's data.<BR>
Select user where the user name is equal with the '$userName' param.<BR>
Read from DB or whatever you store the users.<BR>
Return with all of the data that you store to this user (SSO and none SSO data).<BR>
You must return the data names that the program add when the data stored (insert, update)!<BR>
</b><BR><b>param:</b> (string) $userName The unique user name.<br>
<b>return:</b> (array) Single array of the user's data (SSO and none SSO). Keys represents the data name.<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="updateuser" onClick="logFunction('updateuser', 'open-sso.class.php.source.html#l82')" href="open-sso.class.php.source.html#l82">updateUser</a>(<a href="_variables/userName.html">$userName</a>, <a href="_variables/data.html">$data</a>)&nbsp;&nbsp;
<a href="_functions/updateuser.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Update user's data.<BR>
Update all (SSO and none SSO) user's data where the user name is equal with the '$userName' param.<BR>
Update in DB or whatever you store the users.<BR>
'$data' syntax: The data name that you setted in config file with 'sso_' prefix.<BR>
Plus 'user_name', 'user_virid', 'user_groups' variables, and these with 'sso_' prefix.<BR>
Plus your other data that added with 'setUserData();' function.<BR>
</b><BR><b>param:</b> (string) $userName The unique user name.<br>
<b>param:</b> (array) $data Single array of the user's data (SSO and none SSO). Keys represents the data name.<br>
<b>return:</b> void<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="hooklogin" onClick="logFunction('hooklogin', 'open-sso.class.php.source.html#l104')" href="open-sso.class.php.source.html#l104">hookLogin</a>()&nbsp;&nbsp;
<a href="_functions/hooklogin.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Hook: Login<BR>
Call this function after the lib checked the required user data, and created the session.<BR>
(Call this function after the login method.)<BR>
</b><BR><b>param:</b> void<br>
<b>return:</b> void<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="hooklogout" onClick="logFunction('hooklogout', 'open-sso.class.php.source.html#l118')" href="open-sso.class.php.source.html#l118">hookLogout</a>()&nbsp;&nbsp;
<a href="_functions/hooklogout.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Hook: Logout<BR>
Call this function after the lib &quot;destroy&quot; the session.<BR>
(Call this function after the logout method.)<BR>
</b><BR><b>param:</b> void<br>
<b>return:</b> void<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="hookiserror" onClick="logFunction('hookiserror', 'open-sso.class.php.source.html#l132')" href="open-sso.class.php.source.html#l132">hookIsError</a>()&nbsp;&nbsp;
<a href="_functions/hookiserror.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Hook: Is Error?<BR>
Call this function to determine that error is occured or not.<BR>
</b><BR><b>param:</b> void<br>
<b>return:</b> (bool) 'TRUE' if error is occured and 'FALSE' otherwise.<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="hookerror" onClick="logFunction('hookerror', 'open-sso.class.php.source.html#l145')" href="open-sso.class.php.source.html#l145">hookError</a>()&nbsp;&nbsp;
<a href="_functions/hookerror.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Hook: Error<BR>
Call this function when the IDP or the SP is down.<BR>
</b><BR><b>param:</b> void<br>
<b>return:</b> void<br>
</td></tr></table>

<br>
</div></div>

</div>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
	<tr><td>Generated: Fri Jan  8 00:38:44 2010</td>
	<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7</a></i></td>
	</tr>
</table>
</body></html>
